Part Number Hot Search : 
CW22P31 220CA LCA10 IDT74CB DZ23C30 NTE7143 B511S2T RT9624D
Product Description
Full Text Search
 

To Download USB-DAQ-SS Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  p1 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com usb-daq tm the data logger / process controller that looks like a usb flash drive to a pc summary usb-daq is a low cost data logger and process controller. in normal operation it operates autonomously, collecting data and providing control as required. an on- board real time clock is provided. when plugged into a usb port, usb-daq appears on the pc like a removable disk. one file, config.dat, contains the application code. this file is created on the pc from a microsoft excel spreadsheet. other files may be used for logging data. usb-daq uses the mass storage device (msd) usb profile. it does not require usb driver installation, and so is immediately compatible with present and future windows, linux and mac operating systems. usb-daq is generally available in 20-pin and 28-pin packages. both devices can use a 25aa1024 eeprom chip for moderate data storage (128kbyte). the 28-pin device can additionally use internal flash memory for data storage up to 8kbyte or sd card memory and chips up to 1gbyte. a 40/44-pin device, with the same capabilities as the 28-pin device but with extra i/o, can also be made available. applications ? food and drug transportation ? low cost data logging ? rapid autonomous usb product development ? research, development and teaching firmware factory usb product family ? expandio-usb i/o expander ? usb-232, usb-spi, usb-i2c serial bridges ? usb-dataport high speed data transfer ? usb-filesys embedded file system ? usb-daq data logger ? usb-tealeaf security dongle features ? ?flash drive? style pc interface. ? wide range of peripheral i/o ? see table 1 ? data acquisition / process control engine ? flexible instruction set ? 32768hz real time clock with leap year correction and daylight savings time ? usb 2.0 msd plug and play - no drivers required ? one and two chip solutions: - microcontroller with internal 8kb flash memory - microcontroller and 128kb spi memory - microcontroller and sd memory up to 1gb ? dil, soic and ssop packages note: the 20-pin device has reduced functionality. table 1. peripheral feature matrix usb-daq -20-ss -20-dil -28-so -28-dil -44-pt -40-dil internal no 8k byte 8k byte 25aa1024 128k byte 128k byte 128k byte memory options sd card/chip no to 1g byte to 1g byte i/o pins 12 21 32 interrupt on edge 3 3 3 interrupt on change 0 4 4 count / compare / pulse width modul?n 0 2 2 uart (not buffered) 1 1 1 spi/i2c (as master) 1 1 1 uni/o (as master) 12 21 32 comparators 2 2 2 10-bit a to d 9 10 13 timer 8-bit 1 1 1 timer 16-bit 3 3 3 product id (hex) 0135 0134 0136 available packages* dil,ssop dil,soic dil,tqfp *devices in general distribution are usb-daq-20-ss and usb-daq-28-dil firmware factory ltd 3 plough yard, ground floor london ec2a 3lp, uk sales@firmwarefactory.com support@firmwarefactory.com usb-daq looks like flash drive serial memory digital, analog comparator & counter, serial i/o usb flash drive engine data acquisition & process control engine
p2 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com basic operation usb-daq contains a fat file system on which files can be stored. when plugged into a windows, linux or mac pc, usb-daq looks like a flash drive and files can be directly accessed without the need to install drivers or software. the file can be stored in internal memory (8 kbyte), external 25aa1024 memory (128 kbyte), or sd cards or chips up to 1 gbyte. the pc can create, read, write and delete files and subdirectories as required. in addition to functioning as a flash drive, usb-daq has a data acquisition / process control engine and a real time clock that allow it to function autonomously when not connected to the pc. a file named config.dat in the root directory controls the chip?s function when operating in this mode. this file is created in a microsoft excel application and includes instructions to execute on startup, and when an interrupt or real-time-clock event occurs. usb-daq can read and write to up to four files in the root directory; it does not create them, delete them, or change their length. when a file in the root directory is modified by the pc, usb-daq notes the modification date and time data in the directory entry and use this information to set the time on the real time clock. electrical specifications table 2. electrical specifications operating voltage vdd, 28-pin device 2.7v ? 5.5v operating voltage vdd, 20-pin device 1.8v ? 5.5v typical/max supply current, vdd = 5.0 10ma / 21ma typical/max sleep current, vdd = 5.0 0.1a / 2a operating temperature -40c to +85c refer to base mcu data sheets in the dev kit for further information device pinout figure 2, device pinout table 3. 28-pin device pinout pin name description 1 media vpp media detect input teaclipper programming pin vpp 2 ra0 general i/o pin 3 ra1 general i/o pin 4 ra2 general i/o pin 5 ra3 general i/o pin 6 ra4 escape general i/o pin escape input pin 7 ra5 general i/o pin 8, 19 vss power ground reference 9 osca1 12mhz oscillator input 10 osca2 12mhz oscillator output 11 oscb1 rc0 32768hz oscillator input general i/o pin (if no 32768hz oscillator) 12 oscb2 rc1 32768hz oscillator output general i/o pin (if no 32768hz oscillator) 13 miso-m rc2 data input from spi memory general i/o pin (if no external memory) 14 vusb usb supply filter 15 d- usb data - 16 d+ usb data+ 17 rc6 general i/o pin 18 rc7 general i/o pin 20 vdd regulated supply input 21 rb0 general i/o pin 22 rb1 general i/o pin 23 rb2 general i/o pin 24 rb3 general i/o pin 25 ssn-m rb4 slave select output to spi memory general i/o pin (if no external memory) 26 usb-s usb voltage sense 27 mosi-m rb6 pgc data output to spi memory general i/o pin (if no external memory) teaclipper programming pin pgc 28 sck-m rb7 pgd clock output to spi memory general i/o pin (if no external memory) teaclipper programming pin pgd table 4. 20-pin device pinout pin name description 1 vdd regulated supply input 2 osca1 12mhz oscillator input 3 osca2 12mhz oscillator output 4 rst# vpp device reset input (active low) teaclipper programming pin vpp 5 rc5 general i/o pin 6 rc4 general i/o pin 7 rc3 general i/o pin 8 oscb1 rc6 32768hz oscillator input general i/o pin (if no 32768hz oscillator) 9 oscb2 rc7 32768hz oscillator output general i/o pin (if no 32768hz oscillator) 10 ssn-m slave select output to spi memory 11 sck-m clock output to spi memory 12 miso-m data input from spi memory 13 mosi-m data output to spi memory 14 rc2 general i/o pin 15 usb-s usb voltage sense 16 rc0 escape general i/o pin escape input pin 17 vusb usb supply filter 18 d- pgc usb data - teaclipper programming pin 19 d+ pgd usb data+ teaclipper programming pin 20 vss power ground reference
p3 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com dedicated pin functions the pin functions are shown in tables 3 and 4 and figure 2. most are software-configurable general i/o pins. pins with dedicated functions are described below. vss, vdd, vusb vss is the power supply ground reference. vdd should be connected to a regulated supply, most usually the usb power when available and a battery when usb power is not available. vusb should be connected, via a 470nf capacitor, to vss . see for example c8 in figure 3. osca1, osca2 osca1 and osca2 should be connected to a 12mhz parallel cut crystal circuit with 22pf capacitors or a 12mhz resonator with 0.25% total tolerance. oscb1, oscb2 if a real-time clock (rtc) is required, oscb1 and oscb2 should be connected to a 32768hz parallel cut crystal circuit with 27pf capacitors. if the rtc is not required, these pins may be used for general i/o. vpp, pgc, pcd teaclipper programming pins. refer to the teaclipper programming section for details. note that the vpp pin may be subject to voltages as high as 13v during programming. media detect the media detect input pin should be pulled low with a 33k resistor if 25aa1024 memory used. if the sck-m pin is biased low indicating that internal memory is used, the media detect pin is ignored. the media detect input pin should be high during normal operation with sd memory. if sd memory removable, media detect should be taken low when it is removed. if the device is connected to a pc, a soft detach and re- attach will be performed on media removal. the sd memory must be physically removed so that a power-up reset is performed when it is re-inserted. in order to allow usb-daq to be programmed in-circuit, it must be possible to configure the application circuit so that this input appears to be pulled high via a 22k resistor, or pulled low with a 33k resistor. d+, d- usb data i/o. refer to the usb connectors section for details of their connections. usb voltage sense this input should be high when the device is plugged into a usb host. refer to figure 4 for a typical method of deriving this input from the usb supply input. sck-m, miso-m, mosi-m, ssn-m if sd or 25aa1024 memory is used, these pins are the spi serial interface to the memory. 4k7 pull-up resistors are required on all these lines. if internal memory is used, sck-m should be biased low on power-up. these pins may then be used for general i/o. escape escape is an optional input pin. if it is high during initialization, no code will execute. during development, enabling the escape pin is strongly recommended to recover usb-daq from coding errors which might lock the device. (e.g. a reset in the initialization code.) the state of the escape pin is only measured during initialization. the pin may therefore also be used for other purposes provided it can be weakly biased during initialization. status pins optional pins indicating device status and controlling execution are described below. these pin functions can be assigned to any general i/o pin by changing the appropriate setting in the configuration tab of the usb- daq compiler spreadsheet. event indicator the daq initialization code or event code is executing. the pin will pulse for a minimum of 100ms. txrx indicator data was received from or transmitted to the pc. the pin will pulse for approximately 100ms. suspend indicator the suspend output indicates that the pc has entered a low-power sleep mode. in suspend mode, the device should draw no more than 100a from the usb bus. in no event should an external power source inject power into the usb vdd line. allsysgo indicator the ?all systems go? output indicates that the usb is configured and the pc is not in suspend mode. it provides a combined indication that it is safe to draw power from the usb supply. usb-daq can be configured from the spreadsheet to request either 100ma, allowing the device to operate from unpowered hubs, or 500ma, in which case it will only work when connected direct to a pc or powered hub. this is selected by changing the appropriate setting in the configuration tab of the usb-daq compiler spreadsheet. general i/o pins the following pin functions are software configurable at runtime by setting their registers appropriately. examples of their use are given in the development kit. full details of their operation and their associated registers are given in the base microcontroller spreadsheets, also in the development kit. rax, rbx, rcx, rdx, rex digital i/o pins. anx 10-bit analog input pins.
p4 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com intx, kbix interrupt-on-edge (int) and interrupt-on-change (kbi) input pins. ccpx, p1x capture / compare / pulse width modulation pins. tx, rx asynchronous uart sck, miso, mosi, ssn synchronous serial (spi) port scl, sda synchronous serial (i2c) port cxin-, cxin+, cxout comparator pins txcki counter inputs memory internal memory in order to maximize available storage space, the internal memory is pre-formatted as a 16-sector fat12 file system with 512 bytes per sector. (4 of these sectors are required for the file system and root directories.) reformatting by the pc is not permitted. the root directory can contain up to 16 entries, including the volume name. the volume is normally supplied containing no files. if ordered in 5k+ quantities, files can be pre-loaded. to indicate to usb-daq that the internal memory should be used, the sck-m input should be biased low on startup. pages of internal memory may be erased and rewritten approximately 100k times. in order to minimize wear, usb-daq does not update directory entries; it only changes the contents of files. external memory ? 25aa1024 for moderate storage applications, a microchip 25aa1024 memory (128kbyte storage) may be connected to the miso-m, mosi-m, sck-m and ssn-m lines. a 4k7 pull-up resistor should be provided for sck-m. the media detect input should be permanently biased low. when first used, the memory will automatically be formatted as a 16-sector fat12 file system with 512 bytes per sector. the pc may re-format the drive if required. external memory ? sd card / integrated circuit for large storage applications, an sd-compatible memory of up to 1gb may be connected to the miso-m, mosi-m, sck-m and ssn-m lines. 4k7 pull-up resistors should be provided for these lines, and also for unused sd card i/o pins. the memory can be a removable sd card or a sd- compatible chip. if the memory is removable, the media detect input should be connected to a switch to indicate when the card is present. devices with sd card readers will be able to read the data on the sd card directly. memories larger than 1gb will be ignored, as will non- standard memories which do not have block sizes of 512 bytes. san-disk products are used for testing. accessing sd card memory is slow. it is intended mostly for long-term logging applications only. this option is only available for the 28-pin and 40/44-pin devices. memory integrity in the event of power loss during a usb-daq write operation, it is possible that the contents of data may be corrupted. functionality should not otherwise be affected. real time clock the real time clock is self-managing and incorporates day-of-week calculator, leap-year calculator and optional daylight savings time calculator. on power-up, the time is set to 00:00:00, jan 1 st 2000. whenever a file in the root directory is modified by the pc, the time and date are automatically set to the ?last modified? time and date of the file most recently written to in the root directory. to set the time, the user simply needs to open a file in the root directory, modify it, and save it. application circuits the following circuits show typical implementations of the usb-daq. suggested component values are shown in table 5. table 5. suggested component values label component r1-r3, r40-r43 22k resistor r6 1k resistor r21 470 resistor t1 p-channel mosfet, e.g. nds352p d1-d2 low vf switching diode led1 light emitting diode c1 1 f capacitor c2, c3 22pf capacitor c4, c5 27pf capacitor c6-c7, c9 100nf capacitor c8 470nf capacitor x1 12mhz parallel cut crystal x2 32758hz parallel cut crystal in figure 3, the internal memory is used and only contains components that are strictly necessary. the device has its own power source vdd and does not draw power from the usb port. oscillator x1/c2/c3 may be replaced by a low-cost resonator, provided its frequency tolerance is greater than 0.25%. c1 and c6 should be placed close to the
p5 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com usb connector. c7 should be placed near the vss and vdd pins of the usb-daq and is required only if it would be some distance from c6. c8 is a filter capacitor for an internal regulator and is required. the teaclipper connector is for in-circuit programming. it is recommended to allow firmware updates, even if the firmware is initially supplied pre-programmed. see the teaclipper programming section for details. r3 pulls usb-s low when the usb connector is not attached to a pc. r7 ensures the current is limited if vdd is below the usb supply voltage. note how sck-m is biased low by r40. it must be low at startup, but may otherwise be used as general i/o, as may the other serial memory pins. the osca and oscb pins are not connected. there is no real time clock and the event loop can only be triggered by interrupt events. m e d i a / v p p p g d v d d v s s teaclipper connector 1 5 osca1 osca2 d+ vusb usb-daq usb c2 c3 x1 2 3 4 vdd vss p g c 1 2 3 4 vss d- vss c1 c6 c7 v s s c8 vss r2 s c k - m usb-s vss r40 general i/o vss r3 r7 figure 3 . typical application circuit, internal memory figure 4 shows a more advanced circuit with many additional options added. external memory is used. sw1 acts as a media detect switch for an sd card. if 25aa1024 memory is used, the media input should instead be biased low; if non-removable sd memory is used, the media input should instead be biased high. vto is gated by p-channel mosfet t1 to provide power take-off circuit, for example to provide power to a battery charger. c4 and r6 ensure the inrush current is not so great as to cause a significant voltage drop. in this circuit, two power sources are available: power from the usb power input, and a battery vbatt . d1 and d2 ensure the higher of these is used by vdd . if the serial memory cannot not operate at 5v, the usb power should be regulated to 3.3v. x2, c4 and c5 comprise a real time clock oscillator. led1 shows a typical led indicator circuit. m e d i a / v p p p g d v d d v s s teaclipper connector 1 5 osca1 osca2 d+ vusb usb-daq usb c2 c4 x1 2 3 4 vdd vss p g c 1 2 3 4 vss d- vss c1 c6 c7 v s s c8 vdd vss txrx vss r21 r2 m o s i - m m i s o - m s c k - m serial memory vcc gnd m o s i m i s o s c k s s n - m s s n vdd vss usb-s vss pto# vbatt vdd d1 d2 led1 r3 vdd r40-r43 vdd vdd sw1 general i/o oscb1 oscb2 c3 c5 x2 vss vdd vto t1 r1 r6 c9 figure 4. typical application circuit, external memory d1 and d2 should have a very low forward voltage ? ideally 0.3v. usb connectors common usb connector and cable configurations are shown in figure 5 and table 6. the shield on the connector should be left unconnected. the id pin on the mini connector permits the distinction of a and b plugs. the micro connector pin-out is the same as the mini connector. figure 5 common usb pin-outs for male connectors table 6. usb connection key pin std mini name cable color description 1 1 vcc red +5v (can dip to 4.08v) 2 2 d? white data ? 3 3 d+ green data + ? 4 id ? type a: connect to ground type b: not connected 4 5 gnd black signal ground for ultra-low cost products, it is possible to form a usb type-a plug direct from a circuit board as shown in figure 6. this connector is only suitable for a limited number of insertions (~50 before cleaning is required). it is unshielded and recommended only for ?dongle? type products with no cables attached.
p6 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com 4. vss 11.75 1.00-2.00 1.00 1.00 0.50 3.00 12.00 shoulder required to prevent over-insertion overall pcb width 16.00 or less contacts plated with hard gold flash (0.25-1.27m) over nickel (2.6-5.0m) overall pcb thickness including tracks 2.00 - 2.20 3. d+ 2. d- 1. vdd 2.25 1.25 dimensions in mm figure 6. integral usb connector dimensions for further dimensional information, refer to figure 6-7 of the usb 2.0 specification, in the development kit. sd card connector the spi connections for sd cards is shown in figure 7. the two pins marked bh are unused and should be biased high or left unconnected. 6 . v s s 2 . m o s i 1 . c s # 3 . v s s 4 . v d d 5 . s c k 7 . m i s o 8 . b h 9 . b h figure 7. sd card connections. pin 9 is out of order; this is not an error. device programming usb-daq is programmed from the excel spreadsheet usb-daq complier.xls . in it, you can specify general device configuration, application code and application data. after compilation, usb-daq creates a hidden application file called config.dat and any data logging files you may have specified. to program the usb-daq, copy these files to the device. (a write lock option can be specified to prevent further tampering if required.) this section provides an overview of the various elements of the compilation process. refer to the usb- daq compiler.xls spreadsheet and the base microcontroller data sheets for full details. also see the examples in the development kit. device configuration the device configuration section of the spreadsheet allows general settings to be specified, including: - device / company name - real time clock settings - memory settings - application execution settings - data logging files - daylight savings settings - write protect & escape pin write protect will permanently render usb-daq unmodifiable by the pc. it is intended for completed commercial applications only, to ensure the user does not accidentally delete the files. if write protect is set and an attempt is made to modify or delete files, usb-daq will report that the files were successfully modified, even though they were not. this is necessary to enable to time to be set by appearing to modify a file. due to file caching by the pc, the file may appear to be modified until usb-daq is removed and re-inserted. during development, the use of an escape pin is strongly recommended. it ensures you can always recover the usb-daq if your code unintentionally locks the device. failure to do so risks rendering the device useless. if both write protect and the escape pin are enabled, escape takes precedence and allows the write- protected device to be modified. source code the source code section specifies the code to execute during initialization and when an event occurs. the following instructions are provided: - add, sub, mult, div, mod, inc, dec, copy - and, or, xor, comp, neg, rotl, rotr - for, next, do, while, break, continue - if, elseif, else, endif - call, return, goto, onerror - clearfile, setfile, read - writeb, writehex, writedec, writer - delay, reset, sleep - getan, getbit, setbit - getee, setee, lookup - getat, setat registers most operations are associated with registers. available registers include: - 56 bytes general random access memory, usable as 1/2/4-byte, signed/unsigned integers - 21 bytes of daq status registers, including flags, error status, and time and date values - most of the registers of the underlying microcontroller, including ports, peripherals and interrupt control. (the underlying controllers are pic18f2550 for the 28-pin device and pic18f14k50 for the 20-pin device.) non-volatile memory two sections of non-volatile memory are available: - 64 bytes of eeprom may be written and read by the application - program code space can contain read-only data that the application can read with the lookup and writer instructions.
p7 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com interrupt processing in addition to being triggered by the real time clock, application code can be executed in response to an interrupt event. most interrupts are supported. interrupt priority should be set to high. when an interrupt occurs, usb-daq will clear the interrupt enable bit and pass control to the application code. it is then the application code?s responsibility to clear the interrupt flag and re-set the interrupt enable. file access up to four files can be accessed by the usb-daq. it modifies the contents of these files but does not create or delete them, or modify their length. they must be copied from the pc for the application to execute. when the end of the file is reached, the file pointer wraps round to the beginning again (plus any header space reserved.) all read and write operations must be within the 512-byte sector boundaries of the files. therefore it is usual for logged records to be a power of two in length. compiled code the code is compiled into a reduced instruction set which is then interpreted at run-time. this compiled code is shown in the spreadsheet. teaclipper programming for programming the firmware using teaclipper/pic hv, the pgc , pgd and vpp pins must be accessible. during programming, these pins must be protected against contention. in particular, note that vpp is subject to up to 13v during programming. nothing else should be connected to vpp except via a 22k pull-up resistor. the teaclipper connector format is shown in figure 8. since the programming time is very fast, no programming socket is required. the teaclipper can be ?leaned? against the plate-through holes shown. it is strongly recommended that this connector is included in circuits even if in-circuit programming is not anticipated, since this allows you to upgrade the firmware if necessary. 1mm hole dia 2.54mm spacing pin 1 indicated by square pad p g d p g c v p p v s s v d d figure 8. recommended plate-through connector design evaluation board the usb-eval evaluation board is available for evaluating usb-daq. due to the variety of potential implementations it is supplied unpopulated and a prototyping area is provided. this will be necessary for sd memory implementation (see figure 9). it is recommended that new users work with internal memory to reduce the number of connections required and then migrate it to test the circuit actually required. start, perhaps, with figure 3 plus the 32768hz oscillator. note the following common mistakes during development: 1. forgetting to press the ?compile now? button before copying the config.dat to usb-daq. 2. sd memory needs 3.3v power regulation. it is strongly recommended that an escape pin is used, since without it the usb-daq chip can be rendered unusable. figure 9. evaluation board example code examples the following examples are provided in the development kit to illustrate usb-daq usage. digitalanalog.xls this example logs the time, the analog pins an1 and an0, and digital pin ra2 every three seconds. ra4 is used to power the sensor, and so illustrates how to set an output high our low. interrupts.xls this file shows how interrupts are handled. it sets up a falling-edge interrupt on int2. when an interrupt occurs, it flashes an led on ra5 and logs the time to the file. the interrupt flag is then re-enabled and usb-daq goes back to sleep. annilogic.xls this anniversary reminder application demonstrates basic arithmetic and how to read files. it also illustrates: - how long file names can be presented to the user while usb-daq accesses them using their short file names. - the use of the preprocessor to create meaningful variable names, and overlaying them to re-use memory. - calling subroutines.
p8 of 8 26-aug-10 usb-daq hw147-5 www.hexwax.com testdst.xls this file is an application you can use to test any daylight savings rules you implement. it sets the clock to just before the time change and logs the time to a file. debugging during development debugging facilities with usb-daq are limited. the following practices are recommended: ? rather than starting a completely new application, start with one of the code examples and slowly modify it, testing at each step, to produce the application you want. ? for simple applications, use leds to test and indicate status. ? for complex applications, to log diagnostics to a file using writer and writedec. development kit a firmware development kit is available for download from www.hexwax.com containing the following files: ? usb-daq compiler.xls spreadsheet. ? code examples ? base controller data sheets (? microchip technology inc) ? usb 2.0 specification (? hp / intel / lucent / microsoft / nec / philips 2000) warranty the warranty and liability provisions for this pre-loaded software product follow software industry conventions. please refer to www.hexwax.com and/or www.flexipanel.com for a complete warranty statement. firmware factory ltd 3 plough yard, ground floor london ec2a 3lp, uk sales@firmwarefactory.com support@firmwarefactory.com


▲Up To Search▲   

 
Price & Availability of USB-DAQ-SS

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X